﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Mobile.Master" CodeBehind="Questions_mobile.aspx.vb" Inherits="BooksReviewApp.Questions_mobile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <div data-role="content">
        <asp:Button ID="btn_Events" runat="server" Text="Add Question" CssClass="m-btn purple"
            PostBackUrl="~/AddQuestion.aspx" />
        <br />
        <asp:ListView ID="ListView1" runat="server" DataKeyNames="ID" DataSourceID="SqlDataSource2">
            <ItemTemplate>
                <li class="hoverClass">
                     
                    <a id="RepeaterStyle" href="ViewQuestion.aspx?Question=<%# Eval("Question_Number")%>&Book_FK=<%# Eval("ID")%>">
                        <img src='<%# Eval("Thumbnail") %>'  alt="No picture found"  width="100" height="100" style="border-style: solid; border-width: medium" />
                    <h1><asp:Label ID="lbl_Name" CssClass="BookNameLabel" runat="server" Text='<%# Eval("BookName") %>' /></h1>
                    
                    
                    <p><asp:Label ID="lbl_Category" CssClass="CategoryLabel" runat="server" Text='<%# "Chapter : " & Eval("Chapter") & " Question : " & Eval("Question_Number") %>' /></p>
                    
                    <p>Asked •
                    <asp:Label ID="lbl_Time" runat="server" Text='<%# CalculateTime.calculateTimeNoHours(Eval("Question_Added")) %>'
                        ForeColor="#7AC0DA" />
                    
                    • By •
                    <asp:HyperLink ID="HyperLink2" runat="server" Text='<%# Eval("Questioner")%>' NavigateUrl='<%# Eval("Questioner", "Profile.aspx?Bibliophile={0}") %>'
                        ForeColor="Red" Font-Bold="True" CssClass="red" Font-Size="Smaller">
                        <asp:Label ID="BibliophileLabel" CssClass="BookNameLabel" runat="server" Text='<%# Eval("Questioner")%>' />
                    </asp:HyperLink></p><br />
                </li>
            </ItemTemplate>
            <LayoutTemplate>
                <ul data-role="listview" data-filter="true">
                      <li runat="server" id="itemPlaceholder" />
                </ul>
            </LayoutTemplate>
        </asp:ListView>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:BooksReviewDBConnectionString1 %>"
            ProviderName="<%$ ConnectionStrings:BooksReviewDBConnectionString1.ProviderName %>" SelectCommand="SELECT * FROM [Books_Questions] WHERE IsVerified = 1 ORDER BY Question_Added DESC">
        </asp:SqlDataSource>

        </div>
</asp:Content>
